import request from '/@/utils/request';

/**
 * 文件接口
 */
export function useFileApi() {
    return {
        upload: (data) => {
            return request({
                url: '/file/qiniu/token',
                method: 'POST',
                data,
            });
        },
        download: (path) => {
            return request({
                url: '/file/download/' + path,
                method: 'GET',
            });
        },
        deleted: (data) => {
            return request({
                url: '/file/deleted',
                method: 'POST',
                data,
            });
        },
    };
}
